import request from '@/utils/request'

// 查询用户派对列表
export function listParty(query) {
  return request({
    url: '/dynamic/party/list',
    method: 'get',
    params: query
  })
}

// 查询用户派对详细
export function getParty(id) {
  return request({
    url: '/dynamic/party/' + id,
    method: 'get'
  })
}

// 新增用户派对
export function addParty(data) {
  return request({
    url: '/dynamic/party',
    method: 'post',
    data: data
  })
}

// 修改用户派对
export function updateParty(data) {
  return request({
    url: '/dynamic/party',
    method: 'put',
    data: data
  })
}

// 删除用户派对
export function delParty(id) {
  return request({
    url: '/dynamic/party/' + id,
    method: 'delete'
  })
}
// 加入自动库接口
export function joinPartyAuto(id,userId) {
  return request({
    url: '/dynamic/party/joinPartyAuto?partyId=' + id+"&userId="+userId,
    method: 'get'
  })
}
